{extend name="$_tpl_public_layout_danceadmin"/}


{block name="breadcrumb"}
<ol class="breadcrumb">
	<li class="breadcrumb-item"><a href="{:url('admin/index/index')}">{:config('system.site_title')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('admin/weixinAccount/index')}">{:config('sys_name')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('weixin_manage/event/index', ['wid'=>$wid])}">{$sideName}</a></li>
</ol>
{/block}


{block name="pageheader"}
{$sideName}
{/block}


{block name="content"}
<div class="card mb-3">
	<div class="card-header">事件的用法</div>
	<div class="card-body">
		<p>触发文字：针对微信公众号对话框里面输入的内容，比如用户输入『萌宝』，那么弹出一个图文消息，还可以带链接</p>
		<p>菜单关联关键字：针对点击菜单弹出图文消息，需要在『微信菜单』，添加『按钮事件』为『点击推事件』，比如『关健字』可以填成『EVENT_MENGBAO』，把两者『关键字』对应即可。</p>
	</div>
</div>

<div class="card mb-3">
	<div class="card-body">
		<div class="dataTable-toolbar">
			<a href="{:url('weixin_manage/event/add', array('wid'=>$wid))}" class="btn btn-primary btn-sm dataTable-add">添加事件</a>
		</div>
		<form class="">
			<table class="table table-bordered table-hover dataTable-table">
				<thead>
					<tr>
						<th width="76">序号</th>
						<th width="120">触发文字</th>
						<th width="140">菜单关联关键字</th>
						<th width="120">消息类型</th>
						<th>描述</th>
						<th width="120">图片</th>
						<th width="60">状态</th>
						<th width="120">操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="list" id="vo"}
					<tr>
						<td>{$i}</td>
						<td>{$vo['event_text']}</td>
						<td>{$vo['event_key']}</td>
						<td>{$msgtype_config[$vo['event_msgtype']]}</td>
						<td>
							<div>标题：{$vo['title']}</div>
							<div>描述：{$vo['descrip']}</div>
							<div>媒体ID：{$vo['media_id']}</div>
						</td>
						<td><img src="{$vo['picurl']}" class="upload-img-full" /></td>
						<td><?php echo isOpenRadioValueB($vo['isopen']); ?></td>
						<td>
							<a href="{:url('weixin_manage/event/add', array('wid'=>$wid, 'id'=>$vo['id']))}" class="btn btn-primary btn-xs" title="添加菜单" data-tip="添加菜单">编辑</a>
							<a href="{:url('weixin_manage/event/delete', array('wid'=>$wid, 'id'=>$vo['id']))}" class="btn btn-danger btn-xs J_layerConfirm" data-tip="确认删除吗？">删除</a>
						</td>
					</tr>
					{/volist}
				</tbody>
			</table>
		</form>
		<div class="dataTable-pages">{$showPage}</div>
	</div>
</div>
{/block}